/**
 * 拖拽上传区域样式
 * 提供清晰的视觉反馈和良好的用户体验
 */

.upload-drop-zone-container {
  width: 100%;
}

/* 拖拽区域基础样式 */
.upload-drop-zone {
  border: 2px dashed #d9d9d9;
  border-radius: 8px;
  background-color: #fafafa;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-drop-zone:hover {
  border-color: #40a9ff;
  background-color: #f0f8ff;
}

/* 拖拽悬停状态 */
.upload-drop-zone.drag-over {
  border-color: #1890ff;
  background-color: #e6f7ff;
  transform: scale(1.02);
}

/* 拖拽激活状态 */
.upload-drop-zone.drag-active {
  border-color: #52c41a;
  background-color: #f6ffed;
  border-style: solid;
}

/* 禁用状态 */
.upload-drop-zone.disabled {
  border-color: #f0f0f0;
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

.upload-drop-zone.disabled:hover {
  border-color: #f0f0f0;
  background-color: #f5f5f5;
  transform: none;
}

/* 拖拽区域内容 */
.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.drop-zone-icon {
  font-size: 48px;
  color: #8c8c8c;
  margin-bottom: 16px;
  transition: color 0.3s ease;
}

.upload-drop-zone:hover .drop-zone-icon {
  color: #1890ff;
}

.upload-drop-zone.drag-over .drop-zone-icon {
  color: #1890ff;
}

.upload-drop-zone.drag-active .drop-zone-icon {
  color: #52c41a;
}

.drop-zone-text {
  line-height: 1.6;
}

.drop-zone-text .ant-typography {
  margin: 0;
}

/* 已选择文件区域 */
.selected-files-section {
  margin-top: 16px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background-color: #ffffff;
}

.files-header {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  background-color: #fafafa;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.files-header .ant-typography {
  margin: 0;
}

/* 文件列表 */
.files-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 0;
}

.files-list .ant-list-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  transition: background-color 0.3s ease;
}

.files-list .ant-list-item:hover {
  background-color: #f9f9f9;
}

.files-list .ant-list-item:last-child {
  border-bottom: none;
}

.files-list .ant-list-item-meta {
  align-items: center;
}

.files-list .ant-list-item-meta-avatar {
  margin-right: 12px;
}

.files-list .ant-list-item-meta-avatar .anticon {
  font-size: 20px;
  color: #1890ff;
}

.files-list .ant-list-item-meta-content {
  flex: 1;
  min-width: 0;
}

.files-list .ant-list-item-meta-title {
  margin-bottom: 4px;
  line-height: 1.4;
}

.files-list .ant-list-item-meta-description {
  margin: 0;
  line-height: 1.2;
}

.files-list .ant-list-item-action {
  margin-left: 12px;
}

/* 添加更多文件按钮 */
.add-more-files {
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  background-color: #fafafa;
  border-radius: 0 0 8px 8px;
}

.add-more-files .ant-btn {
  height: 36px;
  border-style: dashed;
  border-color: #d9d9d9;
  color: #8c8c8c;
  transition: all 0.3s ease;
}

.add-more-files .ant-btn:hover {
  border-color: #40a9ff;
  color: #40a9ff;
}

.add-more-files .ant-btn:disabled {
  border-color: #f0f0f0;
  color: #bfbfbf;
  cursor: not-allowed;
}

/* 文件类型标签 */
.files-list .ant-tag {
  margin-left: 8px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 16px;
  height: 18px;
  padding: 0 4px;
}

/* 滚动条样式 */
.files-list::-webkit-scrollbar {
  width: 6px;
}

.files-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.files-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.files-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .upload-drop-zone {
    padding: 30px 15px;
    min-height: 100px;
  }

  .drop-zone-icon {
    font-size: 36px;
    margin-bottom: 12px;
  }

  .drop-zone-text {
    font-size: 14px;
  }

  .files-list {
    max-height: 150px;
  }

  .files-list .ant-list-item {
    padding: 8px 12px;
  }

  .files-list .ant-list-item-meta-avatar .anticon {
    font-size: 16px;
  }

  .files-header {
    padding: 8px 12px;
  }

  .add-more-files {
    padding: 8px 12px;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .upload-drop-zone {
    padding: 35px 20px;
  }

  .files-list .ant-list-item {
    padding: 16px;
  }

  .files-list .ant-list-item-action .ant-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
  .upload-drop-zone {
    border-color: #434343;
    background-color: #1f1f1f;
  }

  .upload-drop-zone:hover {
    border-color: #177ddc;
    background-color: #111b26;
  }

  .upload-drop-zone.drag-over {
    border-color: #177ddc;
    background-color: #112a41;
  }

  .upload-drop-zone.drag-active {
    border-color: #389e0d;
    background-color: #162312;
  }

  .selected-files-section {
    border-color: #434343;
    background-color: #1f1f1f;
  }

  .files-header {
    background-color: #262626;
    border-bottom-color: #434343;
  }

  .files-list .ant-list-item {
    border-bottom-color: #303030;
  }

  .files-list .ant-list-item:hover {
    background-color: #262626;
  }

  .add-more-files {
    background-color: #262626;
    border-top-color: #434343;
  }

  .add-more-files .ant-btn {
    border-color: #434343;
    color: #8c8c8c;
    background-color: transparent;
  }

  .add-more-files .ant-btn:hover {
    border-color: #177ddc;
    color: #177ddc;
  }
}
